package com.kongjian.manage.controller;

import com.flk.component.client.common.ProtocolType;
import com.flk.component.client.common.exception.FlkCCSignException;
import com.flk.component.client.common.http.HttpClientConfig;
import com.flk.component.client.sign.FlkSvsClient;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author tangjunfeng
 * @Classname StorageCapacityController.java
 * @Description 数字孪生安全改造controller
 * @Date 2023-12-13
 * @Version V1.0
 */
@Api(tags = "数字孪生安全改造")
@RestController
@Validated
@RequestMapping("/api/v1/digital-twin")
@CrossOrigin
@Slf4j
public class DigitalTwinController {

    public static void main(String[] args) {
        //http请求配置，请求连接数，连接超时时长，ssl配置等
        HttpClientConfig config = HttpClientConfig.getDefault("10.82.118.244");
        config.setProtocolType(ProtocolType.HTTP);
        config.setBaseUrl("/svs");
        FlkSvsClient svsClient = null;
        try {
            svsClient = new FlkSvsClient(config);
        } catch (FlkCCSignException e) {
            log.error(e.getMessage(), e);
        }

        String s = svsClient.SOF_signData("JUNFENG".getBytes());
        System.out.println(s);

    }







}
